package com.freemalll.system.domain;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.freemalll.common.core.annotation.Excel;
import com.freemalll.common.core.annotation.Excel.ColumnType;
import com.freemalll.common.core.web.domain.AuditEntity;

/**
 * 角色资源关系表 sys_role_res_rel
 * 
 * @author freemalll
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_role_res_rel")
public class SysRoleResRel extends AuditEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Excel(name = "主键ID", cellType = ColumnType.STRING)
    private String id;

    /** 资源id */
    @TableField("resource_id")
    @Excel(name = "资源id")
    @NotBlank(message = "资源id不能为空")
    @Size(min = 0, max = 36, message = "资源id不能超过36个字符")
    private String resourceId;

    /** 角色id */
    @TableField("role_id")
    @Excel(name = "角色id")
    @NotBlank(message = "角色id不能为空")
    @Size(min = 0, max = 32, message = "角色id不能超过32个字符")
    private String roleId;
}